Menu

Wiki usage

Creative Commons License
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.
Edit Sidebar
Main > RotatingDoors

How to make a Rotating Door

On this page...

Construction

First of all, build your door: one (or more) brushes for the door itself and another brush for the origin brush:

The door may consist of more than one brush (e.g. to add a window to it), but for now, we make the door just out of 1 brush:

(click to enlarge)

Now, we add a origin brush. This will tell the engine where the axis of the door is, and it will be exactly in the center of that origin brush. Make a brush overlapping the door at the hinge's side. It is easier to select later, if u made it thicker than the door. Texture this brush with common/origin:

(click to enlarge)

These are the pieces our door will be made of. Now select all brushes of the door (in this case just one) and additionally the origin brush.

All brushes selected? Great! Now rightclick in any 2D-view on one of the (still selected) brushes. This will open a list of all available entities. Choose func/rotatingdoor

(click to enlarge)

You have made a rotating door!

Unfortunately you will have to tell the engine, how this rotating door shall behave ingame. To do so, you will have to set some keys and their values. For this, your door - or atleast one brush of it - must be selected. If it isn't already, select one brush of the door, and press 'n'.

This will open the entity inspector

(click to enlarge)

Here you can enter the keys and their values the rotating door is needing to work properly.

Most important is the key 'angle' and its correct value. Take a look at the table below to see which door will get which value. In general the angle must be set perpendicular to the door face.

Special doors need special key/value pairs. They are listed in the lower part of the table.

Setting up a func_rotatingdoor's keys

correct angle settings

This is the group of buttons, where u enter the angle of a func_rotatingdoor the easiest way. Just click the button with the correct angle and a key/value pair will be set.
In the top-view, you can imagine the player standing at U/D. Now choose the button, the player would have to look at to see thedoor.

Please note: You will not be able to make the door swing up or down, just to the side. Many tried but invain. You will have to use a script_object for this!

Pictures of the door in the xy top viewkeyvalue
or angle90 or 270 (doesn't matter)
or angle0 or 180 (doesn't matter)
or angle135 or 315 (doesn't matter)
or angle45 or 225 (doesn't matter)

Opening direction set by alwaysawaySetting
Explanation: Player with blue outline causes door to open in the blue arrow's direction, and the green outlined player in the green arrow's direction. Easy eh?alwaysaway 1 or nothing set, because alwaysaway 1 is default
alwaysaway 0

Settingthe door's sound
doortypekeyvalue
wooden doordoortypewood
metal doordoortypemetal

Misc keys and values
healthif set, door must be shot open
dmgdamage to inflict when blocked (0 default)
timemovement time(0.3 default)
waitwait before returning (3 default, -1 = never return)
openanglehow wide the door will open(90 default)

Some other checkboxes
START_OPENIf u want the door to start in its open position, check this
OPEN_DIRECTIONWhen using alwaysaway/0, the door may open in the wrong direction. Check 'OPEN_DIRECTION' then and it'll open the other way
DOORS_DONT_LINKA pair of doors touching in the middle (two wings) will open simultanously. Check this to avoid it. Even a pair of doors which shall act as a two winged door u'll have to build and turn into doors seperately!!
TOGGLEStays in the open position until 'used' or triggered again
AUTO_OPENOpens when player just comes near the door, he won't have to 'use' it.
example
this door should sit on the map's top view like: hinge in the lower left and handle in the upper right or vice versa (angle/135) it will open just in one direction (alwaysaway/0), and it will be the 'other' direction (OPEN_DIRECTION checked) It will stay open (TOGGLE checked) until used again. And it will sound like a metal door (doortype/metal).

Notes

Why must the origin brush not overlap with the adjacent walls? I'm sure I've had no trouble when my origin brush has overlapped with adjacent walls. In fact, I believe the origin brush should most certainly overlap with the adjacent walls in order for the door to open like a real door. As opposed to the image shown here, I believe the center of the origin brush should touch both the edge of the door and the edge of the wall, like a real hinge does, rather than lying inside the door as shown here. That way the door will act more like a door in your house - one corner of it will always be touching (or very close to it) the door frame, as opposed to the example given here which would more closely match a door that had holes in the floor and door frame above and below it with an axle about which the door rotated, like you might see with glass doors. I might be wrong here, but I'm pretty sure this works, although I don't know much about the architecture of the time :)

- dcoshea

You are correct. No problem putting the origin anywhere you want... even completely inside the wall works fine. If you want it to rotate around a point inside the wall, no problem. The origin only decides around what x/y coordinate the door will rotate ( z value is not used ).

- Bjarne

Recent Changes Printable View Page History Edit Page [Attributes] [Printable View] [WikiHelp]
Page last modified on January 27, 2005, at 10:53 PM